<div class="lops form">
<?php echo $this->Form->create('Lop',array('onsubmit'=>'return validate();'));//validate cai j day ?>

		<h2><?php __('Thêm cố vấn'); ?></h2>







<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
		<td>STT</td>
		<td>Tên lớp</td>
		<td>Tên cố vấn</td>
	</tr>
	<?php $stt=1;
	 foreach ($lops as $key => $lop):?>
	 
	<tr>
		<td><?php echo $stt?></td>
		<td><?php echo $lop?></td>
		<td><?php echo $form->input('giangvien_id',array('name'=>'data[Lop][giangvien]['.$key.']','id'=>'giangvien','type'=>'select','options'=>$giangviens,'empty'=>''));?></td>
		<?php echo $form->input('lop',array('name'=>'data[Lop][lop]['.$key.']','id'=>'lop','type'=>'hidden','value'=>$key));?>
	</tr>

<?php ++$stt; 
endforeach; ?>
</table>
<?php echo $form->end('   Lưu   ');?>
</div>